"""
@author：yiwang
@file_name: __init__.py
@create date: 2023-08-31
@file_description：
"""

from apps.NGS_API.common.db_table_config import *

form_to_database = {
    "extraction":"ngs_extraction",
    "sample":"sms_sample",
    "sample_instock":"sms_sample_instock",
    "sample_outstock":"sms_sample_outstock",
    "stock":"sms_stock_raw",
    "ngsLib":"ngs_library",
    "project":"pms_project",
    "bioana":"ams_ngs_analysis"
}

class add_form:
        extraction = {
            "id": "编号",
            "extraction_id": "核酸提取样品编号",
            "stock_id": "库存样品编号",
            "sample_id": "初始样品编号",
            "operate_user": "实验员编号",
            "check_user": "质检员编号",
            "operate_time": "实验时间",
            "create_time": "条目创建时间"
        }

        sample = {
            # "id":"编号",
            "primary_sample_id":"样品编号",
            "primary_project_id":"项目编号",
            "sample_source":"样品来源",
            "sample_type":"样品类型",
            "sample_name":"样品名称",
            "operate_user":"样品接收人",
            "check_user":"复核人",
            # "init_concen":"初始样品浓度",
            # "init_volume":"初始样品体积",
            # "cur_amount":"现存样品量",
            # "create_time":"条目创建时间",
            "extra_info":"备注"
        }
        
        stock = {
            "id":"编号",
            "stock_id":"存货编号",
            "primary_project_id":"项目编号",
            "primary_sample_id":"样品编号",
            "status":"存货状态",
            "stock_label":"存货标签",
            "stock_locale":"存货位置",
            "instock_type":"入库类型",
            "instock_user":"入库人",
            "instock_check_user":"库管",
            "instock_amount":"入库样品量",
            "instock_time":"入库时间",
            # "cur_amount":"现存样品量",
            "create_time":"条目创建时间",
        }
    
        ngsLib = {
            "id":"编号",
            "library_id":"文库编号",
            "stock_id":"建库存货编号",
            "sample_id":"初始样品编号",
            "operate_user":"实验员编号",
            "check_user":"质检员编号",
            "operate_time":"实验时间",
            "create_time":"条目创建时间",
        }

        project = {
            # "id":"编号",
            "primary_id":"项目编号*",
            "project_tag":"项目名称*",
            "client_id":"客户编号",
            "product_id":"产品编号",
            "protocol_id":"项目使用实验编号", 
            "sample_receive_id":"样品接收单编号",
            "project_type":"项目类型",
            "project_level":"项目等级划分",
            "create_user":"项目创建人编号*",
            "incharge_user":"项目负责人*"
            # "create_time":"创建时间",
            # "status":"项目状态"
        }
        
        bioana = {
            # "id":"编号",
            "analysis_id":"分析编号",
            "project_id":"项目编号",
            "n_sample":"样品数",
            "operate_user":"操作人",
            "check_user":"审核人",
            "status": "分析状态",
            "pipeline": "流程名称",
            "commit_hash": "commit版本",
            # "operate_start_time": "分析开始时间",
            # "operate_end_time":"分析结束时间",
            "argument_template":"分析报告模板",
            # "create_time":"创建时间",
            # "modify_time":"更新时间"
        }
        
class del_form:
    extraction = {
            "extraction_id": "核酸提取样品编号",
            "stock_id": "库存样品编号",
            "sample_id": "初始样品编号",
            "operate_user": "实验员编号",
            "check_user": "质检员编号",
            "operate_time": "实验时间",
            "create_time": "条目创建时间"
    }
    
    sample = {
        "id":"编号",
        "sample_id":"样品编号",
        "project_id":"项目编号",
        "sample_source":"样品来源",
        "sample_type":"样品类型",
        "sample_name":"样品名称",
        "operate_user":"样品接收人",
        "check_user":"复核人",
        "init_amount":"初始样品量",
        "cur_amount":"现存样品量",
        "create_time":"条目创建时间",
    }

    ngsLib = {
        "id":"编号",
        "library_id":"文库编号",
        "stock_id":"建库存货编号",
        "sample_id":"初始样品编号",
        "operate_user":"实验员编号",
        "check_user":"质检员编号",
        "operate_time":"实验时间",
        "create_time":"条目创建时间",
    }

    stock = {
        "id":"编号",
        "stock_id":"存货编号",
        "project_id":"项目编号",
        "sample_id":"样品编号",
        "status":"存货状态",
        "stock_label":"存货标签",
        "stock_locale":"存货位置",
        "instock_type":"入库类型",
        "instock_user":"入库人",
        "instock_check_user":"库管",
        "instock_amount":"入库样品量",
        "instock_time":"入库时间",
        "cur_amount":"现存样品量",
        "create_time":"条目创建时间",
    }
    
class out_form:
    sample = {
        "id":"编号",
        "sample_id":"样品编号",
        "project_id":"项目编号",
        "sample_source":"样品来源",
        "sample_type":"样品类型",
        "sample_name":"样品名称",
        "operate_user":"样品接收人",
        "check_user":"复核人",
        "init_amount":"初始样品量",
        "cur_amount":"现存样品量",
        "create_time":"条目创建时间",
    }
    
class up_form:
    sample = {
        "id":"编号",
        "sample_id":"样品编号",
        "project_id":"项目编号",
        "operate_user":"样品接收人",
        "check_user":"复核人",
        "init_amount":"初始样品量",
        "cur_amount":"现存样品量",
        "create_time":"条目创建时间",
    }